<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>快捷收款信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="/admin/welcomepage">首页</a>
        <a href="javascript:window.location.reload();">
          <cite>快捷收款信息</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:void(0);" onclick="reload_iframe();" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i>
    </a>
</div>
<div class="x-body">
    <blockquote class="layui-elem-quote">此处为快捷付款页面的各种信息修改,请填写仔细后方可使用快捷收款功能!</blockquote>
    <fieldset class="layui-elem-field layui-col-md11 " style="margin-top: 10px;">
        <legend>快捷收款信息</legend>
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-xs6 layui-col-md6">
                    <div class="grid-demo grid-demo-bg1" style="text-align: center;">
                        <div style="padding-top: 20px;">
                            <div class="qr-image" id="qrcode" style="width: 230px;height: 230px;margin: 0 auto;"
                                 th:title="${protocol}+'://'+${host}+'/quickpass?id='+${model.uid}+'target=1'"></div>
                        </div>
                        <div style="padding-top: 20px;">
                            <span style="color: green;">提示:请保存该二维码,用户扫码即可收款!</span>
                        </div>
                        <div style="padding-top: 20px;"></div>
                    </div>
                </div>
                <div class="layui-col-xs6 layui-col-md6 layui-col-space5">
                    <div class="grid-demo grid-demo-bg1" >
                        <div style="padding-top: 30px;">
                            <blockquote class="layui-elem-quote layui-quote-nm"><h1 style="color: red;font-size: 18px;">简要说明:</h1><br>
                                <span style="text-align: left;font-size: 16px;color:chocolate;">
                                    1.请保存左侧二维码到图片,用户可以扫码付款.<br>
                                    <th:block th:text="'2.手机端在线收款为:&nbsp;'+${protocol}+'://'+${host}+'/quickpass?id='+${model.uid}+'&target=1 '"></th:block>
                                    <br>
                                    3.本收款码支持:微信,手机QQ,支付宝,手机浏览器等软件扫码支付.<br>
                                    4.手机用户请长按图片保存到相册即可.  <br>
                                    5.电脑用户请右击图片选择另存为保存到本地.
                                </span>
                            </blockquote>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
    <fieldset class="layui-elem-field layui-col-md11 " style="margin-top: 10px;">
        <legend>快捷收款页面设置</legend>
        <form class="layui-form" id="add_cedew" onsubmit="return false;">
            <input type="hidden" name="id" th:value="${model.id}">
            <input type="hidden" name="uid" th:value="${model.uid}">
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                    <label class="layui-form-label">网站名称</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="sitename" th:value="${model.sitename}"  autocomplete="off" class="layui-input" >
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">网站域名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="ym" th:value="${model.ym}" autocomplete="off" class="layui-input " >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                    <label class="layui-form-label">关键字</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="keywords" th:value="${model.keywords}"  autocomplete="off" class="layui-input" >
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">网站描述</label>
                    <div class="layui-input-inline">
                        <input type="text" name="description" th:value="${model.description}" autocomplete="off" class="layui-input " >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                    <label class="layui-form-label">赞助留言</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="liuyan" th:value="${model.liuyan}"  autocomplete="off" class="layui-input" >
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">音乐外链</label>
                    <div class="layui-input-inline">
                        <input type="text" name="music" th:value="${model.music}" autocomplete="off" class="layui-input " >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                    <label class="layui-form-label">支付标题</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="panel" th:value="${model.panel}"  autocomplete="off" class="layui-input" >
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">底部版权</label>
                    <div class="layui-input-inline">
                        <input type="text" name="copy" th:value="${model.copy}" autocomplete="off" class="layui-input " >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline layui-col-md5 layui-col-md-offset1">
                    <label class="layui-form-label">站长QQ</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="kfqq" th:value="${model.kfqq}"  autocomplete="off" class="layui-input" >
                    </div>
                </div>
                <div class="layui-inline layui-col-md5">
                    <label class="layui-form-label">赞助宣言</label>
                    <div class="layui-input-inline">
                        <input type="text" name="gg" th:value="${model.gg}" autocomplete="off" class="layui-input " >
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-col-md-offset4" onclick="cerfedewdcec();">保存修改</button>
                </div>
            </div>
        </form>
    </fieldset>
</div>
</body>
<script src="/static/js/qrcode.min.js"></script>
<script th:inline="javascript">

    $(function () {
        var qrcode = new QRCode("qrcode", {
            text: "[(${protocol})]://[(${host})]/quickpass?id=[(${model.uid})]&target=1",
            width: 230,
            height: 230,
            colorDark: "#000000",
            colorLight: "#ffffff",
            correctLevel: QRCode.CorrectLevel.H
        });
    });


    function cerfedewdcec() {
        var data = $("#add_cedew").serialize();
        layer.load(0);
        $.post("/admin/config/update",
            data,
            function (data) {
                layer.closeAll();
                layer.alert(data.msg, {icon: 6}, function () {
                    reload_iframe();
                });
            }, "json");
    }

    window.onload  = close_loading_msg();

    function reload_iframe() {
        parent.obj = parent.layer.load(0);
        location.replace(location.href);
    }

</script>
</html>